package com.kmxd.ams.client.archive.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 门类关联关系
 *
 * @author nickbi
 * @since 2022-07-20
 */
@Data
@Schema(description = "门类关联关系对象")
public class ArchiveRelationVO implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  @Schema(description = "原始门类配置id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long archTypeId;

  @Schema(description = "原始所属表名")
  private String tableId;

  @Schema(description = "原始档案id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long dataId;

  @Schema(description = "关联门类配置id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long referArchTypeId;

  @Schema(description = "关联所属表名")
  private String referTableId;

  @Schema(description = "关联档案系统id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long referDataId;

  @Schema(description = "关联档案系统rid")
  private String referDataRid;

  @Schema(description = "关联标识 根据关联方式，取值不同")
  private String relationIdentity;

  @Schema(description = "关联方式 1业务系统标识，2档案系统标识，3元数据")
  private Integer relationType;

  @Schema(description = "关联元数据 id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long relationFieldId;

  @Schema(description = "冗余档号")
  private String archCode;

  @Schema(description = "冗余题名")
  private String title;

  @Schema(description = "冗余状态")
  private Boolean status;

  @Schema(description = "来源标识")
  private Integer sourceIdentity;

  @Schema(description = "来源说明")
  private String sourceInfo;

  @Schema(description = "创建人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long createBy;

  @Schema(description = "创建时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  @Schema(description = "更新人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long updateBy;

  @Schema(description = "更新时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;

  @Schema(description = "删除状态(0-正常,1-已删除)")
  private Long delFlag;

  @Schema(description = "匹配数量")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long archNum;
}
